package merge

import "strings"

type MergeArgs struct {
	SourceHome string //资源目录
	OutputFile string //合并够的文件名
}

func NewMergeArgs(args []string) *MergeArgs {
	var mergeArgs MergeArgs
	for _, v := range args {
		parts := strings.Split(v, " ")
		if strings.HasPrefix(v, "-sourcehome") {
			mergeArgs.SourceHome = parts[1]

		} else if strings.HasPrefix(v, "-outputfile") {
			mergeArgs.OutputFile = parts[1]

		}
	}
	return &mergeArgs
}
